package com.grablist.feihu.grablist.ui.actviity.login;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import butterknife.Bind;
import com.grablist.feihu.grablist.R;
import com.grablist.feihu.grablist.base.BaseActivity;
import com.grablist.feihu.grablist.event.NetErrorEvent;
import com.grablist.feihu.grablist.ui.widget.CountDownView;

/**
 * Created by chenjian on 17/12/7.
 */

public class StartAct extends BaseActivity {

    @Bind(R.id.countDownView)
    CountDownView countDownView;



    @Override
    protected void setRoot() {
        setTitleBar("#FFFFFFFF");
        setContentView(R.layout.activity_start);

    }

    @Override
    protected void setup() {
    }


    @Override
    protected void init(@Nullable Bundle savedInstanceState) {

        countDownView
                .setCountDownTimerListener(new CountDownView.CountDownTimerListener() {
                    @Override
                    public void onStartCount() {
                    }

                    @Override
                    public void onFinishCount() {
                        startAct(LoginAct.class,null);
                        countDownView.finishTime();
                        finishAct();
                    }
                });

        countDownView.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                startAct(LoginAct.class,null);
                countDownView.finishTime();
                finishAct();
            }
        });


    }


    @Override
    public void onNetErrorEvent(NetErrorEvent event) {
        super.onNetErrorEvent(event);
    }

    @Override
    protected void onNetError(NetErrorEvent event) {

    }

}

